from flask import session
from flask_script import Manager
from flask_migrate import Migrate,MigrateCommand
from info import create_app,db
from info import models


'''
1 集成配置类
2 集成sqlalchemy
3 集成redis
4 集成csrfprotect
5 集成flask-session
6 集成flask-script
7 集成flask-migrate
'''


app = create_app("develop")

# 集成flask-script
manager = Manager(app)

# 集成flask-migrate  在flask中对数据库进行迁移
Migrate(app,db)

manager.add_command("db",MigrateCommand)





if __name__ == "__main__":
    manager.run()